﻿namespace MicroCloud.CodeGeneration
{
    [Description(nameof(CodeGenerationPack))]
    public class CodeGenerationPack : PackBase
    {

        public override PackLevel Level => PackLevel.Module;

        public override int OrderNo => 0;

        /// <summary>将模块服务添加到依赖注入服务容器中</summary>
        /// <param name="services">依赖注入服务容器</param>
        /// <returns></returns>
        public override IServiceCollection AddServices(IServiceCollection services)
        {
            services.AddScoped<ICodeGenerator, RazorCodeGenerator>();
            services.AddScoped<IDataContract, DataService>();
            return base.AddServices(services);
        }

    }
}
